# 假设这是在Django项目中
from django.db import models

# 定义模型类
class User(models.Model):
    name = models.CharField(max_length=100)
    age = models.IntegerField()

# 创建用户
new_user = User(name='John', age=30)
new_user.save()

# 查询用户
users = User.objects.all()
for user in users:
    print(user.name, user.age)
